package com.tanhua.model.mongo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;


import java.io.Serializable;

//桃花传音，语音的数据库实体类
/*选择mongo来作为数据库，应对频繁的语音保存和查询，且支持海量数据
* */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "voice")
public class Voice implements Serializable {
    //序列化id
    private static final long serialVersionUID = -3136732836884833872L;
    private ObjectId id;
    private Long created; //创建时间
    private Long userId;  //语音发布人的id
    private String soundUrl; //语音文件，URL
    private String isPickup = "0"; //是否被拾取,0代表没有被拾取，1代表被拾取

}
